import matplotlib.pyplot as plt

from randow_walk import RandowWalk

while True:
    rw = RandowWalk(10000)
    rw.fill_walk()

    # 设置绘图窗口的尺寸，单位为英寸
    plt.figure(figsize=(10,6))

    point_numbers = list(range(rw.num_points))
    # plt.scatter(rw.x_values, rw.y_values, c=point_numbers, cmap=plt.cm.Blues,
    #             edgecolor='none', s=15)
    plt.plot(rw.x_values, rw.y_values)
    # plt.scatter(rw.x_values, rw.y_values, s=15)

    # 隐藏坐标轴
    # plt.axes().get_xaxis().set_visible(False)
    # plt.axes().get_yaxis().set_visible(False)

    plt.show()

    keep_running = input("Make another walk?(y/n)")
    if keep_running == 'n':
        break

